package com.scnlf.scnlf.portal.common.controller;

import com.scnlf.scnlf.portal.api.dto.UserDTO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class CommonPortalController {

    @Value("${server.port}")
    private String port;

    /**
     * http://localhost:4000/listAllUsers
     * @return
     */
    @GetMapping(value = "/listAllUsers")
    public List<UserDTO> listAllUser(){
        System.out.println("do. port = " + port);
        List<UserDTO> users = new ArrayList<>();
        users.add(new UserDTO().setName("ZhangSan"));
        return users;
    }


}
